﻿<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="业务单成本统计" />
<%@ include file="../inc/PrintTitle.jsp"%>
<head>
<script src="/js/popup_ext.js"></script>
<script language="javascript">
	function doCancel(){
		window.close();
	}
	function doPrint(){
		ShowConfirm('确认框','确定开始打印吗？',340,80,"doPrintCallBack()");
	}
	function doPrintCallBack(){
		if(popRetVal!=null){
			document.getElementById("noPrinSpan").style.display="none";
			printContent("管理易-业务单成本统计","${enterpriseInfo.doPrint}","${enterpriseInfo.printWidth}");
			document.getElementById("noPrinSpan").style.display="";
		}
	}
</script>
</head>
<body style="background-color:#FFFFFF">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" align="center">
	<tr>
		<td>
			<table width="98%" border="0" cellspacing="1" cellpadding="1" align="center">
				<tr>
					<td height="40px" align="center" class="FontLarge_Bold">${licenseInfo.enterpriseName} 业务单成本统计</td>
				</tr>
		  </table>
		</td>
	</tr>
	<tr>
		<td>
			<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="ListTable">
				<tr class="ListTrPrint">
			      	<td class="FontSmall" >汇总金额：${totalCost}元</td>
				</tr>
		  </table>
		</td>
	</tr>	
	<tr>
		<td>
			<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="small_border">
				<tr class="ListTrPrint">
					<td class="ListTd FontSmall_Bold" width="13%" align="center">单号</td>
					<td class="ListTd FontSmall_Bold" width="9%" align="center">日期</td>
					<td class="ListTd FontSmall_Bold" width="12%" align="center">供/需方</td>
					<td class="ListTd FontSmall_Bold" width="5%" align="center">出/入</td>
					<td class="ListTd FontSmall_Bold" width="10%" align="center">材料编号</td>
					<td class="ListTd FontSmall_Bold" width="13%" align="center">品名规格</td>
					<td class="ListTd FontSmall_Bold" width="5%" align="center">单位</td>
					<td class="ListTd FontSmall_Bold" width="6%" align="center">数量</td>
					<td class="ListTd FontSmall_Bold" width="6%" align="center">单价</td>
					<td class="ListTd FontSmall_Bold" width="6%" align="center">金额</td>
					<td class="ListTd FontSmall_Bold" width="15%" align="center">业务单号</td>
				</tr>
				<c:forEach var="item" items="${list}" varStatus="i">
				<tr class="ListTrPrint">
					<td class="FontSmall">${item.billCode}</td>
					<td class="FontSmall"  align="center"><fmt:formatDate value="${item.billDate}" pattern="yyyy-MM-dd"/></td>
					<td class="FontSmall" align="center">${item.otherName}</td>
					<td class="FontSmall"  align="center">
						<c:if test="${item.billType=='IN'}">入</c:if>
						<c:if test="${item.billType=='OUT'}">出</c:if>
					</td>
					<td class="FontSmall">${item.productCode}</td>
					<td class="FontSmall">${item.productName}</td>
					<td class="FontSmall" align="center">${item.productUnit}</td>
					<td class="FontSmall" align="right"><commonTag:parseBigDecimal source="${item.amount}" /></td>
					<td class="FontSmall" align="right"><commonTag:parseBigDecimal source="${item.unitPrice}" /></td>
					<td class="FontSmall" align="right"><commonTag:parseBigDecimal source="${item.cost}" /></td>
					<td class="FontSmall" align="center">${item.bbCode}</td>
				</tr>
				</c:forEach>
		  </table>
		</td>
	</tr>
	<tr>
		<td height="3"></td>
	</tr>
	<tr id="noPrinSpan">
		<td>
			<table width="98%" border="0" cellspacing="1" cellpadding="1" align="center">
				<tr>
					<td>
						<input type="button" id="printButton" class="Button" value="开始打印" onClick="doPrint();">
						<input type="button" id="cancelButton" class="Button" value=" 退 出 " onClick="doCancel();">
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</body>
</html>